/********************************************************************************
 *      Copyright:  (C) 2025 LingYun<iot25@lingyun>
 *                  All rights reserved.
 *
 *       Filename:  main.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(23/04/25)
 *         Author:  LingYun <iot25@lingyun>
 *      ChangeLog:  1, Release initial version on "23/04/25 19:31:45"
 *                 
 ********************************************************************************/


#ifndef  _MAIN_H_
#define  _MAIN_H_



#include <sys/types.h>
#include <sys/socket.h>
#include <string.h>
#include <stdio.h>
#include <arpa/inet.h>
#include <errno.h>
#include <unistd.h>
#include <getopt.h>
#include <stdlib.h>
#include <pthread.h>
#include <signal.h>
#include <time.h>
#include <sqlite3.h>



#define DEFAULT_PORT 8888
#define MAX_CLIENTS 1024


typedef void *(*Thread_Body) (void *);


// 全局变量
extern int g_server_running;
extern sqlite3 *g_db;


void print_usage(char *progname);
void signal_handler(int signo);



#endif

